#!/bin/sh

source /etc/profile
source ~/.zshrc
if [ $# -lt 1 ]; then
    echo "[ERROR] usage: $0 <service-name> <args>"
    exit 2
fi
process=$1
sh ./stop-service.sh $process
if [ "$?" -ne "0" ]; then
  echo "[ERROR] stop service [${process}] failed"
  exit -1;
fi
sh ./start-service.sh $process $2
